<?php namespace App\Controllers\Phm;

use App\Controllers\Phm\MyBaseController;

//访问地址：http://127.0.0.1/phm/public/index.php/Phm/TxController
//控制器父类，相当于一个路由

class TxController extends MyBaseController
{
    var $menuUrl;

    //构造函数
    function __construct()
    {
        parent::__construct();
        $this->initUrl();
    }

    function checkIdNormal($AID)
    {
        if (!is_numeric($AID)) {
            exit();
        }
        if ($AID < 1) {
            exit();
        }
        return $AID;
    }

    function checkBase64IdNormal($AID)
    {
        //检测传入的编号是否正确
        $m_ID = base64_decode($AID);
        return $this->checkIdNormal($m_ID);
    }

    //初始化模块页面地址
    function initUrl()
    {
        //通用主页
        $baseurl = 'public/index.php/phm/';

//        页面：
//        1、项目介绍 introduction
//        2、运行看板 operatingdata
//        3、实时追踪 realtimetracking
//        4、健康趋势 healthtrends
//        5、PHM任务  phmtask
//        6、基础数据 basedata
//        7、修改日志 changelog

        $this->menuUrl = array(
            'introduction' => base_url($baseurl . 'introduction/introductionindex'),
            'operatingdata' => base_url($baseurl . 'operatingdata/operatingdataindex'),
            'realtimetracking' => base_url($baseurl . 'realtimetracking/realtimetrackingindex'),
            'phmtask' => base_url($baseurl . 'phmtask/phmtaskindex/action'),
            'basedata' => base_url($baseurl . 'basedata/basedataindex/action'),
            'changelog' => base_url($baseurl . 'changelog/changelogindex'),
            'charttemp4line' => base_url($baseurl . 'healthtrends/charttemp4line'),
            'breaktemperature' => base_url($baseurl . 'healthtrends/breaktemperature'),
            'apubleedpress' => base_url($baseurl . 'healthtrends/apubleedpress'),

        );
    }
    //--------------------------------------------------------------------
}